<!-- Sidebar user panel (optional) -->
<div class="user-panel">
	<div class="pull-left image">
		<img src="{$Think.WWW_ROOT}/public/static/common/adminlte/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
	</div>
	<div class="pull-left info">
		<p>{php}echo session('admin_auth.role');{/php}</p>
		<!-- Status -->
		<a href="#"><i class="fa fa-circle text-success"></i>  {php}echo session('admin_auth.username');{/php}</a>
	</div>
</div>

 
<ul class="sidebar-menu" id="mymenu">
	<li class="header">后台管理菜单</li>
	<?php
		$menuHtml = '';
		foreach($mymenus as $v){
			$name_temp = strtolower($v['name']);
			if($v['child']){
				if(strpos($name_temp,$controller) === false){
					$menuHtml .='<li class="treeview">';
				}else{
					$menuHtml .='<li class="treeview active">';
				}
				
				$menuHtml .='<a href="#"><i class="fa fa-square"></i> <span>'.$v["title"].'</span> <i class="fa fa-angle-left pull-right"></i></a>';
				$menuHtml .='<ul class="treeview-menu">';
				foreach($v['child'] as $vo){
					$cname_temp = strtolower($vo['name']);
					if($cname_temp == $nowUrl){
						$class="active";
					}else{
						$class = '';
					}
					$menuHtml .='<li class="'.$class.'"><a href="'.url($vo["name"]).'"><i class="fa fa-link"></i> <span>'.$vo["title"].'</span></a></li>';
					 
				}
				$menuHtml .='</ul>';
				$menuHtml .='</li>';
				 
			}else{
				if($name_temp == $nowUrl){
					$class="active";
				}else{
					$class = '';
				}
				$menuHtml.='<li class="'.$class.'"><a href="'.url($v["name"]).'"><i class="fa fa-link"></i> <span>'.$v["title"].'</span></a></li>';
			}
		
		}
		
		echo $menuHtml;
	 
	?>
	 

</ul>
 